package data;

import java.util.Arrays;
import java.util.List;

public class Record {

	 String firstName;
	 String lastName;
	 String Description;
	 static int recordCount=10000;
	 String uniqueID;
	 String status;
	 String officerID;
	
	public String getOfficerID() {
		return officerID;
	}

	public void setOfficerID(String officerID) {
		this.officerID = officerID;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getLastSeenPlace() {
		return lastSeenPlace;
	}

	public void setLastSeenPlace(String lastSeenPlace) {
		this.lastSeenPlace = lastSeenPlace;
	}

	public String getLastSeenDate() {
		return lastSeenDate;
	}

	public void setLastSeenDate(String lastSeenDate) {
		this.lastSeenDate = lastSeenDate;
	}
	public String address;
	public String lastSeenPlace;
	public String lastSeenDate;

	public String isStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Record(String recordType)
	{
		
		if(recordType=="MR")
		{
			uniqueID=recordType+recordCount;
			//System.out.println("TYPE="+uniqueID);
		}
		else if(recordType=="CR")
		{
			uniqueID=recordType+recordCount;
			//System.out.println("TYPE="+uniqueID);
		}
		++recordCount;
	}
	
	//used to create copy of record object for transfer
	public Record(String theRecord,boolean isTransferRecord)
	{
		if(isTransferRecord)
		{
			List<String> arrlist=Arrays.asList(theRecord.split(","));
			uniqueID=arrlist.get(1);
			officerID=arrlist.get(2);
			firstName=arrlist.get(3);
			lastName=arrlist.get(4);
			address=arrlist.get(5);
			lastSeenDate=arrlist.get(6);
			lastSeenPlace=arrlist.get(7);
			status=  arrlist.get(8);
		}
	}
	
	
	public String getUniqueID() {
		return uniqueID;
	}

/*	public void setUniqueID(String uniqueID) {
		this.uniqueID = uniqueID;
	}
*/	
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	public String getDescription() {
		return Description;
	}
	public void setDescription(String description) {
		Description = description;
	}
}
